<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-salary-edit" th:object="${salary}">
            <input name="sId" th:field="*{sId}" type="hidden">
            <input name="sName" th:field="*{sName}" type="hidden">
            <input name="sStatus" th:field="*{sStatus}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">员工工资：</label>
                <div class="col-sm-8">
                    <input name="sMoney" th:field="*{sMoney}" class="form-control" type="text">
                </div>
            </div>
<!--            <div class="form-group">-->
<!--                <label class="col-sm-3 control-label">工资状态：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <select name="bForm" th:with="type=${@dict.getType('salary_status')}">-->
<!--                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sStatus}">-->
<!--                    </select>-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">
                <label class="col-sm-3 control-label">工资日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="sDate" th:value="${#dates.format(salary.sDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/salary";
        $("#form-salary-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-salary-edit').serialize());
            }
        }

        $("input[name='sDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>